{extend name='admin@public/content'}
{block name="button"}

<!--{if auth("$classuri/add")}-->
<button data-open='{:url("$classuri/add")}' data-title="添加流水" class='layui-btn layui-btn-sm layui-btn-primary'>添加流水</button>
<!--{/if}-->

{/block}
{block name="content"}

<!-- 表单搜索 开始 -->
<form autocomplete="off" class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get">

    <!--{if !empty($members)}-->
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">会员</label>
        <div class="layui-input-inline">
            <select name="mid" lay-search>
                <option value="">请选择</option>
                {foreach $members as $member}
                <option {$Think.get.mid==$member['id']?'selected':''} value="{$member.id}">{$member.nickname}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <!--{/if}-->
    <!--<div class="layui-form-item layui-inline">
        <label class="layui-form-label">流水类型</label>
        <div class="layui-input-inline">
            <select name="type" lay-search>
                <option value="">请选择</option>
                {foreach $Think.const.ACCOUNT_LOG_TYPE_TEXT as $key=>$text}
                <option {$Think.get.type==$key?'selected':''} value="{$key}">{$text}</option>
                {/foreach}
            </select>
        </div>
    </div>-->
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">手机号</label>
        <div class="layui-input-inline">
            <input name="mobile" value="{$Think.get.mobile}" placeholder="请输入手机号" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item layui-inline">
        <label class="layui-form-label">时间</label>
        <div class="layui-input-inline">
            <input name="addtime" id="addtime" value="{$Think.get.addtime}" placeholder="请选择时间" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item layui-inline">
        <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
    </div>

</form>

<script>
    window.laydate.render({range: true, elem: '#addtime'});
    window.form.render();
</script>
<!-- 表单搜索 结束 -->

<form onsubmit="return false;" data-auto="true" method="post">
    {if empty($list)}
    <p class="help-block text-center well">没 有 记 录 哦！</p>
    {else}
    <input type="hidden" value="resort" name="action"/>
    <table class="layui-table" lay-skin="line">
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <input data-auto-none="none" data-check-target='.list-check-box' type='checkbox'/>
            </th>
            <th class='text-left nowrap'>ID</th>
            <th class='text-left nowrap'>用户</th>
            <!--<th class='text-left nowrap'>类型</th>-->
            <th class='text-left nowrap'>信用分</th>
            <th class='text-left nowrap'>备注</th>
            <th class='text-left nowrap'>时间</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td class='list-table-check-td think-checkbox'>
                <input class="list-check-box" value='{$vo.id}' type='checkbox'/>
            </td>
            <td class='text-left nowrap'>{$vo.id}</td>
            <td class='text-left nowrap'>
                {$vo.mid|getmodel='store_member','nickname'}
            </td>
            <!--<td class='text-left nowrap'>
                { $Think.const.ACCOUNT_LOG_TYPE_TEXT[$vo.type] }
            </td>-->
            <td class='text-left nowrap'>{$vo['credit']>0?'+':''}{$vo['credit']}</td>
            <td class='text-left nowrap'>{$vo['remark']}</td>
            <td class='text-left nowrap'>{$vo.addtime|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {if isset($page)}<p>{$page|raw}</p>{/if}
    {/if}
</form>
{/block}